package com.cn.ant.modules.volunteer.entity;

import com.cn.ant.common.persistence.MyDataEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.hibernate.validator.constraints.Length;

import java.util.Date;
import java.util.List;

/**
 * 志愿组合Entity
 * @author 黄根华
 * @version 2015-10-11
 */
public class Volunteer extends MyDataEntity<Volunteer> {
	
	private static final long serialVersionUID = 1L;
	private String volunteerCode;		// 编码
	private String name;		// 组合名称
	private String vtype;		// 组合类型
	private int vscore;		// 分数
	private String vprovince;		// 省份编码
	private String kmType;		// 科类
	private String batchLevel;		// 批次
	private String userId;		// 用户信息
	private Date createTime;		// 生成时间

	private List<VolunteerSchool> volunteerSchoolList;
	
	public Volunteer() {
		super();
	}

	public Volunteer(String id){
		super(id);
	}

	@Length(min=0, max=20, message="编码长度必须介于 0 和 20 之间")
	public String getVolunteerCode() {
		return volunteerCode;
	}

	public void setVolunteerCode(String volunteerCode) {
		this.volunteerCode = volunteerCode;
	}
	
	@Length(min=0, max=64, message="组合名称长度必须介于 0 和 64 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=20, message="组合类型长度必须介于 0 和 20 之间")
	public String getVtype() {
		return vtype;
	}

	public void setVtype(String vtype) {
		this.vtype = vtype;
	}
	
	public int getVscore() {
		return vscore;
	}

	public void setVscore(int vscore) {
		this.vscore = vscore;
	}
	
	@Length(min=0, max=10, message="省份编码长度必须介于 0 和 10 之间")
	public String getVprovince() {
		return vprovince;
	}

	public void setVprovince(String vprovince) {
		this.vprovince = vprovince;
	}
	
	@Length(min=0, max=6, message="科类长度必须介于 0 和 6 之间")
	public String getKmType() {
		return kmType;
	}

	public void setKmType(String kmType) {
		this.kmType = kmType;
	}
	
	@Length(min=0, max=6, message="批次长度必须介于 0 和 6 之间")
	public String getBatchLevel() {
		return batchLevel;
	}

	public void setBatchLevel(String batchLevel) {
		this.batchLevel = batchLevel;
	}
	
	@Length(min=0, max=32, message="用户信息长度必须介于 0 和 32 之间")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public List<VolunteerSchool> getVolunteerSchoolList() {
		return volunteerSchoolList;
	}

	public void setVolunteerSchoolList(List<VolunteerSchool> volunteerSchoolList) {
		this.volunteerSchoolList = volunteerSchoolList;
	}
}